Couldn't figure out RI on time so here's a low effort sum solve. Cycle count is way too high.